How can I make a `weeks_ago` helper?

Posted by Joseph Silvashy on Stack Overflow See other posts from Stack Overflow or by Joseph Silvashy
Published on 2010-03-28T22:40:18Z Indexed on 2010/03/28 22:43 UTC
Read the original article Hit count: 266

Filed under:

How can I make a helper that will tell me how many weeks ago (rounded down) with rails? It could be based of the time_ago_in_words helper however I'd want it to return: "last week" then afterwards just two weeks ago, three weeks ago, etc...

© Stack Overflow or respective owner

Related posts about ruby-on-rails